package com.appspot.moviesessions.interfaces.webapp.dto;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name="location")
public class Location {

	@XmlAttribute
	private Long id;
	
	@XmlAttribute
	private String name;

	public Long getId() {
    	return id;
    }

	public String getName() {
    	return name;
    }

	public static Location fromLocation(
            com.appspot.moviesessions.model.Location location) {
		Location dLocation = new Location();
		dLocation.id = location.getId();
		dLocation.name = location.getName();
		return dLocation;
    }

}
